package Modules.PlayerModule.InventoryModule.Tables
{
	public class Item
	{
		public var itemID:String;
		public var itemName:String;
		public var itemType:String;
		public var itemPrice:int;
		public var itemAmountInInventory:int;
		
		public var levelRequired:int;
		public var expgain:int;
		public var diamondPrice:int;
		
		public function Item(id:String, name:String, type:String, price:int)
		{
			itemID = id;
			itemName = name;
			itemType = type;
			itemPrice = price;
			itemAmountInInventory = 0;			
		}
		
		public function getID():String{
			return itemID;
		}
		
		public function getName():String{
			
			return itemName;
		}
		
		public function getType():String{
			
			return itemType;
		}
		
		public function getPrice():int{
			
			return itemPrice;
		}
		
		public function getAmount():int{
			
			return itemAmountInInventory;
		}
		
		public function setAmount(amount:int):void{
			
			itemAmountInInventory = amount;
		}
		
		public function upAmount():Boolean{
		
			itemAmountInInventory += 1;	
			
			return true;
		}
		
		public function downAmount():Boolean{
			
			
			if(itemAmountInInventory-1 >=0){
				
				itemAmountInInventory -= 1;
				return true;
			}else{
				
				return false;
			}
		}
	}
}